package com.open.basic.net;

import java.io.IOException;


/**
 * @author: system
 * @Date: 2024/9/24 上午11:48
 * @Version: V1.0
 * @description: ->
 */

public interface SocketIO {
    boolean init() throws IOException;

    void write(byte b) throws IOException;

    void write(byte[] bytes) throws IOException;

    byte read() throws IOException;

    int read(byte[] b, int off, int len) throws IOException;

    void flush() throws IOException;

    boolean isConnected();

    boolean isAlive();

    byte[] readLineBytes() throws IOException;

    void release();

    // SockIOBucket getBucket();

    String getHost();

    int getPort();

    void close() throws IOException;

    int getVersion();

    boolean isMaster();

    boolean auth(String password);

    boolean isAuthed();

    void setAuthed(boolean authed);
}
